//
//  CarSafeRangeMgr.h
//  carcareIOS
//
//  Created by ileo on 15/7/14.
//  Copyright (c) 2015年 baozun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import "BaseModel.h"

@interface CarFenceModel : BaseModel

@property (nonatomic, assign) NSInteger cid;
@property (nonatomic, copy) NSString *cdt;//yyyy-MM-dd HH:mm:ss
@property (nonatomic, assign) CGFloat lat;
@property (nonatomic, assign) CGFloat lng;
@property (nonatomic, assign) NSInteger radius;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *address;

@property (nonatomic, copy) NSString *showTime;
@property (nonatomic, assign) CLLocationCoordinate2D coordinate;

@end

@interface CarFenceMgr : NSObject

DEF_SINGLETON

@property (nonatomic, copy) NSArray *fences;

+(void)updateFencesFinish:(void(^)())finish;

+(void)addFence:(CarFenceModel *)model finish:(void(^)(id JSON))finish;
+(void)modityFence:(CarFenceModel *)model finish:(void(^)())finish;
+(void)removeFence:(CarFenceModel *)model finish:(void(^)())finish;

@end
